﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" href="css/sms.css" />
<script type="text/javascript" src="scripts/jquery.js"></script>
<script >

	function check(){ 
		if($("#repwd").val()==null || $("#pwd").val()==null){
			alert("请输入密码或重复密码 ");
		}else{
			if($("#repwd").val()!=$("#pwd").val()){
				alert("2次密码不同，请重新输入");
			}
		}
		if($("input:eq(0)").val()!=null && $("input:eq(1)").val()!=null && $("input:eq(3)").val()!=null && $("input:eq(4)").val()!=null)
		{
			if($("#span").html()=="" || $("#span").html()==null){
			return true;
			}else{
				return false;
			}
		}else {
			return false;
		}
}
	$("input:eq(0)").blur(function(){
		var name=$("input:eq(0)").val();
		$.post("checkload","username="+name,function(result){
			$("span:eq(0)").html(result);
		});
	});
</script>
</head>
<body>
<div id="regTitle" class="png"></div>
<div id="regForm" class="userForm png">

	<form action="Userservlet?opr=reg" onsubmit = "return check()" method="post">
		<dl>
			<dt>用 户 名：</dt>
			<dd><input type="text" name="username"  checked=""/><span id="span"></span></dd>
			<dt>密　　码：</dt>
			<dd><input type="password" name="password"  id="pwd"/><span id="span"></span></dd>
			<dt>确认密码：</dt>
			<dd><input type="password" name="repassword"  id="repwd"/><span id="span"></span></dd>
			<dt>邮　　箱：</dt>
			<dd><input type="text" name="email" /><span id="span"></span></dd>
		</dl>
		<div class="buttons">
			<input class="btn-reg png" type="submit" name="register" value="" />
			<input class="btn-reset png" type="reset" name="reset"  value=""/>
		</div>
		<div class="goback"><a href="login.jsp" class="png">返回登录页</a></div>
	</form>
</div>
</body>
</html>
